<!DOCTYPE html>
<html>
{% load staticfiles %}

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>添加用户</title>
    <link href="{% static 'css/bootstrap.min14ed.css' %}" rel="stylesheet">
    <link href="{% static 'css/font-awesome.min93e3.css' %}" rel="stylesheet">
    <link href="{% static 'css/animate.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/style.min862f.css' %}" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeIn">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>添加用户</h5>
            </div>
            <div class="ibox-content">
                <form method="post" action="{% url 'user:add_user' %}" class="form-horizontal">
                    <p class="text-info">{{ msg_good }}</p>
                    <p class="text-danger">{{ msg_bad }}</p>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户名</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="username">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">密码</label>

                        <div class="col-sm-10">
                            <input type="password" class="form-control" name="password1">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">确认密码</label>

                        <div class="col-sm-10">
                            <input type="password" class="form-control" name="password2">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">邮箱(选填):</label>
                        <div class="col-sm-10">
                            <input type="email" class="form-control" name="email">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">创建者</label>
                        <div class="col-sm-10">
                            <input type="text" disabled="" placeholder="{{ user.username }}" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">是否为超级用户</label>
                        <div class="col-sm-10">
                            <div class="radio">
                                <label>
                                    <input type="radio" checked="" value="0" id="optionsRadios1"
                                           name="is_staff">否</label>
                            </div>
                            <div class="radio">
                                <label>
                                    <input type="radio" value="1" id="optionsRadios2"
                                           name="is_staff">是</label>
                            </div>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button class="btn btn-primary" type="submit">保存内容</button>
                            <button class="btn btn-white" type="submit">取消</button>
                        </div>
                    </div>
                    {% csrf_token %}
                </form>
            </div>
        </div>
    </div>
</div>
<script src="{% static 'js/jquery.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/content.min.js' %}"></script>
</body>

</html>
